package com.sp.system.user.service.impl;


import com.sp.system.user.service.Oauth2Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@Component
public class Oauth2FallBack implements Oauth2Service {


    @Override
    public Map<String, Object> getAccessToken(Map<String, String> parameters) {
        log.debug("超时和其他错误");
        Map<String, Object> map = new HashMap<>();
        map.put("status", "401");
        map.put("message", "认证错误或者网络错误,请核对用户名密码");
        return map;
    }

    @Override
    public Object removeToken(String accessToken) {
        log.debug("超时和其他错误");
        Map<String, Object> map = new HashMap<>();
        map.put("status", "-1");
        map.put("message", "退出失败");
        return map;
    }
}
